package JDBC;

import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;

public class connexionBDD {

	public Connection connect() throws Exception{

			Class.forName("org.postgresql.Driver");
			//System.out.println("DRIVER OK ! ");

			String url = "jdbc:postgresql://localhost:5432/ASDESCOURS";
			String user = "postgres";
			String passwd = "postgres";

			Properties p = new Properties();
			p.put("user", user);
			p.put("password", passwd);
			
			Connection conn = DriverManager.getConnection(url, p);
			//System.out.println("Connexion effective !");
			return conn;

	}
}
